chore: migrate rust/qrcode to icp-cli#1401
Merged
Merged
Conversation
f082aa2 to
64f5730
Compare
Replaces dfx.json with icp.yaml using @dfinity/rust@v3.3.0 and @dfinity/asset-canister@v2.2.1 recipes. Moves Rust source to backend/, rewrites frontend to Vite + @icp-sdk/bindgen, updates Makefile tests to use icp canister call, adds CI workflow, and removes dfx artifacts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
64f5730 to
305d50b
Compare
The bindgen-generated binding expects add_transparency?: boolean and converts it to opt bool internally via candid_some/candid_none. Wrapping the value in an array made it [false] (truthy), causing the binding to encode it as [[false]] which is invalid for opt bool. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The file was dropped during migration but is not dfx-specific — it is read by the asset canister and sets important security headers (CSP, X-Frame-Options, Referrer-Policy, etc.). Placed in frontend/public/ so Vite copies it to dist/ unchanged. Only one copy is needed (vs two in the old dfx setup which served both assets/ and src/ as separate roots). Updated icp0.io references to icp.net in CSP and allow_raw_access comment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
icp.net is the frontend hosting domain; icp-api.io is the API endpoint used for canister calls. Updated both the CSP value and the comment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
schneiderstefan
approved these changes
Jun 19, 2026
raymondk
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates
rust/qrcodefrom dfx to icp-cli.Removed:
dfx.json,BUILD.md,webpack.config.js,.devcontainer/, oldsrc/directory, oldMakefileChanged:
src/qrcode_backend/tobackend/; package renamed tobackend@icp-sdk/bindgen; actor wiring updated to usesafeGetCanisterEnv/ic_envcookie pattern.ic-assets.json5consolidated from two copies (old setup served two asset roots) into one atfrontend/public/;connect-srcupdated fromicp0.iotoicp-api.ioAdded:
icp.yamlwith@dfinity/rust@v3.3.0(backend) and@dfinity/asset-canister@v2.2.1(frontend)test.shwith 7 tests: 6--querycalls covering all option combinations + 1 update call.github/workflows/qrcode.ymlusingicp-dev-env-rust:1.0.1Test plan
icp network start -d && icp deploy && bash test.shpasses🤖 Generated with Claude Code